<template>
	<view class="template-hot tn-safe-area-inset-bottom">
		<!-- 顶部自定义导航 -->
		<tn-nav-bar fixed backgroundColor="#4169E1" class="tatils">{{name}}</tn-nav-bar>
		<view class="nas" :style="{paddingTop: vuex_custom_bar_height + 'px'}">
			<view style="font-size: 22px;font-weight: 600;margin-top: 10px;">
				{{info.title}}
			</view>
			<view style="overflow: hidden;margin-top: 10px;">
				<view style="float: left;text-align: left;width: 50%;font-size: 16px;color: #bcbcbc;">{{info.times}}</view>
				<view style="float: left;text-align: right;width: 50%;font-size: 16px;color: #bcbcbc;">浏览量:{{info.knum}}</view>
			</view>
			<view style="font-size: 18px;margin-top: 10px;">
				{{info.desc}}
			</view>
			<view style="margin: 0 auto;height: 160px;margin-top: 10px;">
				<image style="width: 100%;height: 100%;"  :src="info.image"></image>
			</view>
			<view style="overflow: hidden;margin-top: 10px;">
				 <rich-text :nodes="info.contents"></rich-text>
			</view>
		</view>
	</view>
</template>

<script>
	import HTMLParse from 'html-parse'
	import request from '@/request/request.js';
	export default {
		data() {
			return {
				name:'咨询详情',
				id:'',
				info:''
			};
		},
		onLoad(opent) {
			this.id = opent.id
			this.getList(opent.id)
		},
		methods:{
			//获取不同类型的数据
			getList(e) {
				request({
					url: '/Zx/getdetail',
					headers: {
						isToken: false,
					},
					method: 'post',
					data: {
						id: e
					}
				}).then(res => {
					console.log(res)
					this.info = res.data
				}).catch(error => {
					this.tool.toastTip('请稍后重试!', 'none', 1000)
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.tatils{
		color: #fff;
	}
	.nas{
		padding: 10px;
	}
</style>